package com.example.fp.zbs.controller;

import com.example.fp.cgc.code.logAnno.LogAnno;
import com.example.fp.zbs.entity.Overseas;
import com.example.fp.zbs.mapper.OverseasMapper;
import com.example.fp.zlz.entity.Game;
import com.example.fp.zlz.mapper.GameMapper;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@CrossOrigin
@RestController
public class OverseasController {
    @Autowired
    private OverseasMapper overseasMapper;

    @LogAnno(operateType = "应用查询")
  @ApiOperation("应用查询")
   @GetMapping("/selectoverseas")
  public Overseas selectOverseas(int id){
       return overseasMapper.selectById(id);
   }

    @LogAnno(operateType = "应用添加")
    @ApiOperation("应用添加")
    @GetMapping("/insertoverseas")
    public int insertOverseas(Overseas overseas){
        return overseasMapper.insert(overseas);
    }
    @LogAnno(operateType = "应用修改")
    @ApiOperation("应用修改")
    @GetMapping("/updatetoverseas")
    public int updateOverseas(Overseas overseas){
        return overseasMapper.updateById(overseas);
    }
    @LogAnno(operateType = "应用删除")
    @ApiOperation("引用删除")
    @GetMapping("/deleteoverseas")
    public int deleteGame(Overseas overseas){
        return overseasMapper.deleteById(overseas.getId());
    }


}
